<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <title></title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <style type="text/css">
        body{height: 1000px;}
        #f_rb_float{width: 200px;height: 120px; position: absolute; right: 0;}
        #f_rb_float img{border: none;}
    </style>

</head>
<body>

<div id="f_rb_float">
    <a href=""><img src="tishi.gif" alt=""></a>
</div>
<script type="text/javascript">
    (function(){
        var frb=document.getElementById('f_rb_float');
            function getdocst(){
                return document.documentElement.scrollTop || document.body.scrollTop;
              //  l:document.documentElement.scrollLeft || document.body.scrollLeft,

            }
            function getwinh(){
                var doc=document,docElemProp;
                docElemProp = doc.documentElement['clientHeight'];

             var winh= doc.compatMode === 'CSS1Compat' && docElemProp ||  doc.body['clientHeight'] || docElemProp;
                return winh;

            }
            function geteleh(){
                return frb.scrollHeight;
            }
            function getpos(){
                return parseFloat(frb.style.top);
            }
            function anmi(ele,start,end,time){
               var  tween = {
                         linear : function( t, b, c, d){
                         return t*c/d + b;
                    }};
                    var mvTimer;
                    function move( mvObj,t,b,c,d ){
                        t ? t : t=0; b ? b : b = 0; c ? c : c =300; d ? d : d = 50;
                        mvTimer = setInterval(function(){
                              if(t<=d){
                                  setpos(tween.linear(t,b,c,d));
                                  t+=10;
                              }else{

                                  endpos();
                              }

                          } ,10 )
                    }
                    function endpos(){
                        setpos(end);
                        clearInterval(mvTimer);
                    }
                endpos();
                move(ele,0,start,end-start,time);

            }
            function setpos(pos,isanim){
                if(!isanim){
                    frb.style.top=pos+'px';
                }else{
                    setTimeout(function(){
                        setpos(pos);
                    },123);
                }
            }
            function init(){
                setpos(getwinh()-geteleh());
            }
            init();
            window.onscroll=function(){

                 setpos(getwinh()+getdocst()-geteleh(),true);


            }
    })();
</script>
</body>
</html>